import request from "@/utils/request";
export const userLogin = query => {
    return request({
        url: `API_V1.0/token/`,
        method: 'post',
        data: {
            password:"123456",
            rem:true,
            username:"111"
        },
    });
};
//负载历史数据
export const dataAnalysis = () => {
    return request({
        url: `/API_V1.0/load_prediction/analysis`,
        method: 'get',
    });
};

//月平均(month)  周负载(week)  日负载(day) 相关性计算(correlation)
export const analysisAverage = (param) => {
    return request({
        url: `/API_V1.0/load_prediction/analysis_${param}_average`,
        method: 'get',
    });
}
//上传 负载（load_file） 天气（weather_file）接口  预警(weather_translate_file)
export const uploadFile = (param) => {
    return request({
        url: `/API_V1.0/load_prediction/${param.type}`,
        method: 'post',
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        data: param.formData
    });
}
//训练模型
export const analysisTrain = () => {
    return request({
        url: `/API_V1.0/load_prediction/analysis_train`,
        method: 'get',
    });
}

//历史数据状态
export const historyState = () => {
    return request({
        url: `/API_V1.0/load_prediction/state`,
        method: 'get',
    });
}

//stl分解
export const stlAnalysis = () => {
    return request({
        url: `/API_V1.0/load_prediction/analysis_stl`,
        method: 'get',
    });
}

// 基于标准的重过载分析
export const overloadCompare = (param) => {
    return request({
        url: `/API_V1.0/load_prediction/overload_compare/${param}`,
        method: 'get',
    });
}

//AP| V1.0/load prediction/normal_distribution
//正态重过载分析
export const normalDistribution = () => {
    return request({
        url: `/API_V1.0/load_prediction/normal_distribution`,
        method: 'get',
    });
}

///API_V1.0/load_prediction/prediction
//未来负载情况
export const prediction = () => {
    return request({
        url: `/API_V1.0/load_prediction/prediction`,
        method: 'get',
    });
}
